<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改文章</title>
</head>
<body>
<form action="/manage/update/{{ article.id }}" method="post" enctype="multipart/form-data">
    <!-- 文本输入框 -->
    <label for="title">文章标题:</label>
    <input type="text" name="title" value="{{ article.article_title }}"><br>
    <label for="intro">文章简介:</label>
    <input type="text" name="intro" value="{% if article.article_intro %} ''{% endif %} "> <br>
    <label for="intro">文章内容:</label>
    <textarea rows="10" cols="80" name="content">
        {{ article.article_content }}
    </textarea> <br>
    <label for="link">文章连接:</label>
    <input type="text" name="link" value="{{ article.address_link }}"> <br>
    <!-- 下拉列表 -->
    <label for="category_id">文章类别:</label>
    <select name="category_id">
        {% for category in article_category %}
            <option value="{{ category.id }}" {% if category.id == article.category_id %}
                    selected {% endif %} >
                {{ category.category_name }}
            </option>
        {% empty %}
            <option value="0">暂无数据</option>
        {% endfor %}
    </select> <br>
    <label for="file">文章图片:</label>
    <input type="file" name="file" value="{{ article.article_img }}">
    <br>
    <input type="submit" value="提交">
</form>
</body>
</html>